<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="taglib.jsp"%>
<script type="text/javascript">
<!--
$(function(){
	$('#loginBtn').click(function() {
		$.blockUI({
			message : $('#login_box')
		});
		$('.blockOverlay').attr('title', '单击关闭').click($.unblockUI);
		$('.close').click($.unblockUI);
	});
});
//-->
</script>
<div id="global-nav" class="" data-rapid_m="global-nav">
	<div style="width: 900px; position: relative; margin: 0 auto;">
		<div id="logo">
			<a href="${ctx }/"><img src="${ctx }/assets/images/logo.png" /></a>
		</div>
		<div id="menu">
			<ul>
				<c:choose>
					<c:when test="${empty(sessionScope.user) }">
						<li><a href="#" id="loginBtn">登陆</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="${ctx }/user/${sessionScope.user.userID }/vote">我的投票</a>
					</c:otherwise>
				</c:choose>
				<li><a href="${ctx }/">随便看看</a></li>
				<li><a href="#">关于我们</a></li>
				<li style="width: 148px;"><input type="text" class="search" />
					<input type="submit" data-track="Search-search_icon"
					class="search-icon icon" tabindex="-1" value="Search"></li>
				<c:choose>
					<c:when test="${empty(sessionScope.user) }">
						<li><a href="${ctx }/register">注册</a></li>
					</c:when>
					<c:otherwise>
						<li><a href="${ctx }/out">登出</a></li>
					</c:otherwise>
				</c:choose>
			</ul>
		</div>
	</div>
</div>
<div id="login_box">
	<form action="${ctx }/" method="post" id="login" name="login">
		<fieldset>
			<h4 class="top_h4">会员登录</h4>
			<a href="#" class="close" title="关闭">close</a>
			<div class="label">
				<p>用户名</p>
				<input id="username" name="username" type="text" maxlength="50" />
			</div>
			<div class="label">
				<p>密 码</p>
				<input id="password" name="password" type="password" maxlength="50" />
			</div>
			<span class="button2"><a href="#"
				onclick="document.forms['login'].submit()">登 录</a></span><span><a
				href="${ctx }/register">木有账号？赶紧注册</a></span>
		</fieldset>
	</form>
</div>